package com.athena.framework.config;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ConversionCache {

    private static final ConcurrentHashMap<String, DataConversion> conversionCache = new ConcurrentHashMap();

    /**
     * 获取缓存map对象
     *
     * @return
     */
    public static Map<String, DataConversion> getCache() {
        return conversionCache;
    }

    /**
     * 获取缓存的值
     *
     * @param key
     * @return
     */
    public static DataConversion get(String key) {
        return conversionCache.get(key);
    }

    /**
     * 保存值
     *
     * @param key
     * @param value
     * @return
     */
    public static DataConversion put(String key, DataConversion value) {
        return conversionCache.put(key, value);
    }
}
